package cn.itcast.utils;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class BCryptPasswordEncoderUtlis {

    private static BCryptPasswordEncoder bCryptPasswordEncoder=new BCryptPasswordEncoder();

    public static String encodePassword(String password){

        return bCryptPasswordEncoder.encode(password);
    }


    public static void main(String[] args) {
        String password = "user"; //$2a$10$s7WlJRNfekdcegfRF9n5puTHeNLqtJ1NVOkwBWea2NLCKZQXqqpR2
        String s = encodePassword(password);
        System.out.println(s);
    }
}
